import Vue from 'vue'
import VueRouter from 'vue-router';

Vue.use(VueRouter)

import page1 from './components/page1'
import page from './components/page'
import hello from './components/HelloWorld'

const routes=[
    //单个路由均为对象类型，path代表的是路径，component代表组件
    {path:'/page1',component:page1},
    {path:'/page',component:page},
    {path:'/hello',component:hello},
]
//实例化VueRouter并将routes添加进去
const router = new VueRouter({
    routes:routes
})
export default router
